package zhr.chapter5.four;

public class Monitor extends Student {
    private String duty;

    public Monitor() {
    }

    public Monitor(String name, int age, int num, String duty) {
        super(name, age, num);
        this.duty = duty;
    }
    public void onDutt(){
        System.out.println(this.name+" is "+duty);
    }

    @Override
    public void doHomework() {
        System.out.println(this.name + " do and collect homework.");
    }
}
